//
//  SGUtil.h
//  sguo
//
//

#import <Foundation/Foundation.h>
#import <WXApi.h>

@class QYGCoinListModel;
@interface SGUtil : NSObject<WXApiDelegate>

@property (nonatomic, assign) NSInteger pay_id;
@property (nonatomic, strong) QYGCoinListModel *coinListModel;
@property (nonatomic, copy) void(^wxLoginCompleteBlock)(NSString *code);
@property (nonatomic, copy) void(^wxPayCompleteBlock)(NSInteger payType);
@property (nonatomic, copy) void(^rechargeBlock)(BOOL isSuccess, QYGCoinListModel *coinListModel);

#pragma mark 微信支付方法
+ (void)WXPayWithOpenId:(NSString *)openID partnerId:(NSString *)partnerId prepayId:(NSString *)prepayId package:(NSString *)package nonceStr:(NSString *)nonceStr stamp:(NSString *)stamp sign:(NSString *)sign;

//时间戳显示
+ (NSString *)compareCurrentTime:(NSString *)str;

+ (UILabel *)newLabelWithFont:(UIFont *)font textColor:(UIColor *)textColor text:(NSString *)text;
+ (UIButton *)newButtonWithTitleFont:(UIFont *)font title:(NSString *)title titleColor:(UIColor *)titleColor;
+ (UIView *)newViewWithBgColor:(UIColor *)bgColor;
+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;
+ (NSData *)dictionaryToJsonData:(NSDictionary *)dic;
+ (NSString*)dictionaryToJson:(NSDictionary *)dic;
+(instancetype)shareUtil;
+ (BOOL)WXAppIsInstalled;
@end

